﻿///////////////////////////////////////////////////////////////
// This is generated code. If you modify this code, be aware
// of the fact that when you re-generate the code, your changes
// are lost. If you want to keep your changes, make this file read-only
// when you have finished your changes, however it is recommended that
// you inherit from this class to extend the functionality of this generated
// class or you modify / extend the templates used to generate this code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 1.0.2005.1
// Code is generated on: Friday, March 07, 2008 3:18:13 PM
// Code is generated using templates: C# template set for SqlServer (1.0.2005.1)
// Templates vendor: Solutions Design.
// Templates version: 1.0.2005.1.111705
//////////////////////////////////////////////////////////////
using System;
using System.ComponentModel;
using System.Data;
using System.Collections;
using System.Runtime.Serialization;

using RPSDAL;
using RPSDAL.HelperClasses;
using RPSDAL.DaoClasses;
using RPSDAL.EntityClasses;
using RPSDAL.FactoryClasses;

using SD.LLBLGen.Pro.ORMSupportClasses;

namespace RPSDAL.TypedViewClasses
{
	
	// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
	// __LLBLGENPRO_USER_CODE_REGION_END
	
	
	/// <summary>
	/// Typed datatable for the view 'VTemplateDev'.<br/><br/>
	/// 
	/// </summary>
	/// <remarks>
	/// It embeds a fill method which accepts a filter.
	/// The code doesn't support any changing of data. Users who do that are on their own.
	/// It also doesn't support any event throwing. This view should be used as a base for readonly databinding
	/// or dataview construction.
	/// </remarks>
#if !CF
	[Serializable, System.ComponentModel.DesignerCategory("Code")]
	[ToolboxItem(true)]
	[DesignTimeVisible(true)]
#endif	
	public partial class VTemplateDevTypedView : DataTable, IEnumerable, ITypedView
		// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfacesView
		// __LLBLGENPRO_USER_CODE_REGION_END
			
	{
		#region Class Member Declarations
		private DataColumn _columnContactId;
		private DataColumn _columnContactGroupId;
		private DataColumn _columnName;
		private DataColumn _columnEmailAddress;
		private DataColumn _columnMailAddress;
		private DataColumn _columnMailState;
		private DataColumn _columnMailCity;
		private DataColumn _columnMailZip;
		private DataColumn _columnMailCountry;
		private DataColumn _columnPhone;
		private DataColumn _columnMobilePhone;
		private DataColumn _columnFax;
		private DataColumn _columnContactVisitDate;
		private DataColumn _columnSent;
		private DataColumn _columnContactGroupName;
		private DataColumn _columnBusinessRuleId;
		
		// __LLBLGENPRO_USER_CODE_REGION_START AdditionalMembers
		// __LLBLGENPRO_USER_CODE_REGION_END
		
		private static Hashtable	_customProperties;
		private static Hashtable	_fieldsCustomProperties;
		#endregion

		#region Class Constants
		/// <summary>
		/// The amount of fields in the resultset.
		/// </summary>
		private const int AmountOfFields = 16;
		#endregion


		/// <summary>
		/// Static CTor for setting up custom property hashtables. Is executed before the first instance of this
		/// class or derived classes is constructed. 
		/// </summary>
		static VTemplateDevTypedView()
		{
			SetupCustomPropertyHashtables();
		}
		

		/// <summary>
		/// CTor
		/// </summary>
		public VTemplateDevTypedView():base("VTemplateDev")
		{
			InitClass();
		}
		
#if !CF		
		/// <summary>
		/// Protected constructor for deserialization.
		/// </summary>
		/// <param name="info"></param>
		/// <param name="context"></param>
		protected VTemplateDevTypedView(SerializationInfo info, StreamingContext context):base(info, context)
		{
			InitMembers();
		}
#endif

		/// <summary>
		/// Fills itself with data. it builds a dynamic query and loads itself with that query. 
		/// Will use no sort filter, no select filter, will allow duplicate rows and will not limit the amount of rows returned
		/// </summary>
		/// <returns>true if fill succeeded, false otherwise</returns>
		public bool Fill()
		{
			return Fill(0, null, true, null, null, null, 0, 0);
		}


		/// <summary>
		/// Fills itself with data. it builds a dynamic query and loads itself with that query. 
		/// Will not use a filter, will allow duplicate rows.
		/// </summary>
		/// <param name="maxNumberOfItemsToReturn">The maximum amount of rows to return. specifying 0 means all rows are returned</param>
		/// <param name="sortClauses">The order by specifications for the sorting of the resultset. When null is specified, no sorting is applied.</param>
		/// <returns>true if fill succeeded, false otherwise</returns>
		public bool Fill(long maxNumberOfItemsToReturn, ISortExpression sortClauses)
		{
			return Fill(maxNumberOfItemsToReturn, sortClauses, true, null, null, null, 0, 0);
		}


		/// <summary>
		/// Fills itself with data. it builds a dynamic query and loads itself with that query. 
		/// Will not use a filter.
		/// </summary>
		/// <param name="maxNumberOfItemsToReturn">The maximum amount of rows to return. specifying 0 means all rows are returned</param>
		/// <param name="sortClauses">The order by specifications for the sorting of the resultset. When null is specified, no sorting is applied.</param>
		/// <param name="allowDuplicates">Flag to allow duplicate rows (true) or not (false)</param>
		/// <returns>true if fill succeeded, false otherwise</returns>
		public bool Fill(long maxNumberOfItemsToReturn, ISortExpression sortClauses, bool allowDuplicates)
		{
			return Fill(maxNumberOfItemsToReturn, sortClauses, allowDuplicates, null, null, null, 0, 0);
		}


		/// <summary>
		/// Fills itself with data. it builds a dynamic query and loads itself with that query, using the specified filter
		/// </summary>
		/// <param name="maxNumberOfItemsToReturn">The maximum amount of rows to return. specifying 0 means all rows are returned</param>
		/// <param name="sortClauses">The order by specifications for the sorting of the resultset. When null is specified, no sorting is applied.</param>
		/// <param name="allowDuplicates">Flag to allow duplicate rows (true) or not (false)</param>
		/// <param name="selectFilter">Predicate expression to filter on the rows inserted in this TypedView object.</param>
		/// <returns>true if fill succeeded, false otherwise</returns>
		public bool Fill(long maxNumberOfItemsToReturn, ISortExpression sortClauses, bool allowDuplicates, IPredicate selectFilter)
		{
			return Fill(maxNumberOfItemsToReturn, sortClauses, allowDuplicates, selectFilter, null, null, 0, 0);
		}


		/// <summary>
		/// Fills itself with data. it builds a dynamic query and loads itself with that query, using the specified filter
		/// </summary>
		/// <param name="maxNumberOfItemsToReturn">The maximum amount of rows to return. specifying 0 means all rows are returned</param>
		/// <param name="sortClauses">The order by specifications for the sorting of the resultset. When null is specified, no sorting is applied.</param>
		/// <param name="allowDuplicates">Flag to allow duplicate rows (true) or not (false)</param>
		/// <param name="selectFilter">Predicate expression to filter on the rows inserted in this TypedView object.</param>
		/// <param name="transactionToUse">The transaction object to use. Can be null. If specified, the connection object of the transaction is
		/// used to fill the TypedView, which avoids deadlocks on SqlServer.</param>
		/// <returns>true if fill succeeded, false otherwise</returns>
		public bool Fill(long maxNumberOfItemsToReturn, ISortExpression sortClauses, bool allowDuplicates, IPredicate selectFilter, ITransaction transactionToUse)
		{
			return Fill(maxNumberOfItemsToReturn, sortClauses, allowDuplicates, selectFilter, transactionToUse, null, 0, 0);
		}


		/// <summary>
		/// Fills itself with data. it builds a dynamic query and loads itself with that query, using the specified filter
		/// </summary>
		/// <param name="maxNumberOfItemsToReturn">The maximum amount of rows to return. specifying 0 means all rows are returned</param>
		/// <param name="sortClauses">The order by specifications for the sorting of the resultset. When null is specified, no sorting is applied.</param>
		/// <param name="allowDuplicates">Flag to allow duplicate rows (true) or not (false)</param>
		/// <param name="selectFilter">Predicate expression to filter on the rows inserted in this TypedView object.</param>
		/// <param name="transactionToUse">The transaction object to use. Can be null. If specified, the connection object of the transaction is
		/// used to fill the TypedView, which avoids deadlocks on SqlServer.</param>
		/// <param name="groupByClause">GroupByCollection with fields to group by on.</param>
		/// <returns>true if fill succeeded, false otherwise</returns>
		public bool Fill(long maxNumberOfItemsToReturn, ISortExpression sortClauses, bool allowDuplicates, IPredicate selectFilter, ITransaction transactionToUse, 
			IGroupByCollection groupByClause)
		{
			return Fill(maxNumberOfItemsToReturn, sortClauses, allowDuplicates, selectFilter, transactionToUse, groupByClause, 0, 0);
		}


		/// <summary>
		/// Fills itself with data. it builds a dynamic query and loads itself with that query, using the specified filter
		/// </summary>
		/// <param name="maxNumberOfItemsToReturn">The maximum amount of rows to return. specifying 0 means all rows are returned</param>
		/// <param name="sortClauses">The order by specifications for the sorting of the resultset. When null is specified, no sorting is applied.</param>
		/// <param name="allowDuplicates">Flag to allow duplicate rows (true) or not (false)</param>
		/// <param name="selectFilter">Predicate expression to filter on the rows inserted in this TypedView object.</param>
		/// <param name="transactionToUse">The transaction object to use. Can be null. If specified, the connection object of the transaction is
		/// used to fill the TypedView, which avoids deadlocks on SqlServer.</param>
		/// <param name="groupByClause">GroupByCollection with fields to group by on.</param>
		/// <param name="pageNumber">The page number to retrieve.</param>
		/// <param name="pageSize">The page size of the page to retrieve.</param>
		/// <returns>true if fill succeeded, false otherwise</returns>
		public virtual bool Fill(long maxNumberOfItemsToReturn, ISortExpression sortClauses, bool allowDuplicates, IPredicate selectFilter, ITransaction transactionToUse, 
			IGroupByCollection groupByClause, int pageNumber, int pageSize)
		{
			// Build resultset
			IEntityFields fieldsInResultset = EntityFieldsFactory.CreateTypedViewEntityFieldsObject(TypedViewType.VTemplateDevTypedView);
			
			// __LLBLGENPRO_USER_CODE_REGION_START AdditionalFields
			// be sure to call fieldsInResultset.Expand(number of new fields) first. 
			// __LLBLGENPRO_USER_CODE_REGION_END
			
			TypedListDAO dao = DAOFactory.CreateTypedListDAO();
			return dao.GetMultiAsDataTable(fieldsInResultset, this, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, true, groupByClause, transactionToUse, pageNumber, pageSize);
		}


		/// <summary>
		/// Gets the amount of rows in the database for this typed view, not skipping duplicates
		/// </summary>
		/// <returns>the number of rows in the set defined by the passed in query elements</returns>
		public int GetDbCount()
		{
			return GetDbCount(true, null);
		}
		
		
		/// <summary>
		/// Gets the amount of rows in the database for this typed view.
		/// </summary>
		/// <param name="allowDuplicates">Flag to allow duplicate rows (true) or not (false)</param>
		/// <returns>the number of rows in the set defined by the passed in query elements</returns>
		public int GetDbCount(bool allowDuplicates)
		{
			return GetDbCount(allowDuplicates, null);
		}

		
		/// <summary>
		/// Gets the amount of rows in the database for this typed list.
		/// </summary>
		/// <param name="allowDuplicates">Flag to allow duplicate rows (true) or not (false)</param>
		/// <param name="filter">The filter to apply for the count retrieval</param>
		/// <returns>the number of rows in the set defined by the passed in query elements</returns>
		public int GetDbCount(bool allowDuplicates, IPredicateExpression filter)
		{
			return GetDbCount(allowDuplicates, filter, null);
		}


		/// <summary>
		/// Gets the amount of rows in the database for this typed list.
		/// </summary>
		/// <param name="allowDuplicates">Flag to allow duplicate rows (true) or not (false)</param>
		/// <param name="filter">The filter to apply for the count retrieval</param>
		/// <param name="groupByClause">group by clause to embed in the query</param>
		/// <returns>the number of rows in the set defined by the passed in query elements</returns>
		public virtual int GetDbCount(bool allowDuplicates, IPredicateExpression filter, GroupByCollection groupByClause)
		{
			IEntityFields fieldsInResultset = EntityFieldsFactory.CreateTypedViewEntityFieldsObject(TypedViewType.VTemplateDevTypedView);
			TypedListDAO dao = DAOFactory.CreateTypedListDAO();
			return dao.GetDbCount(fieldsInResultset, null, filter, null, groupByClause, allowDuplicates);
		}


		/// <summary>
		/// Gets the enumerator for this class.
		/// </summary>
		/// <returns>Enumerator for this class.</returns>
		public IEnumerator GetEnumerator()
		{
			return this.Rows.GetEnumerator();
		}


		/// <summary>
		/// Creates a new typed row during the build of the datatable during a Fill session by a dataadapter.
		/// </summary>
		/// <param name="rowBuilder">supplied row builder to pass to the typed row</param>
		/// <returns>the new typed datarow</returns>
		protected override DataRow NewRowFromBuilder(DataRowBuilder rowBuilder) 
		{
			return new VTemplateDevRow(rowBuilder);
		}


		/// <summary>
		/// Initializes the hashtables for the typed view type and typed view field custom properties. 
		/// </summary>
		private static void SetupCustomPropertyHashtables()
		{
			_customProperties = new Hashtable();
			_fieldsCustomProperties = new Hashtable();

			// Add custom properties of this type

			// Add per Field a new Hashtable with its custom properties, indexed by the name of the field.
			Hashtable fieldHashtable = null;
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("ContactId", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("ContactGroupId", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("Name", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("EmailAddress", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("MailAddress", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("MailState", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("MailCity", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("MailZip", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("MailCountry", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("Phone", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("MobilePhone", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("Fax", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("ContactVisitDate", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("Sent", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("ContactGroupName", fieldHashtable);
			
			fieldHashtable = new Hashtable();

			_fieldsCustomProperties.Add("BusinessRuleId", fieldHashtable);
						
		}


		/// <summary>
		/// Initialize the datastructures.
		/// </summary>
		private void InitClass()
		{
			
			_columnContactId = new DataColumn("ContactId", typeof(System.Int32), null, MappingType.Element);
			_columnContactId.ReadOnly = true;
			_columnContactId.Caption = @"ContactId";
			this.Columns.Add(_columnContactId);

			_columnContactGroupId = new DataColumn("ContactGroupId", typeof(System.Int32), null, MappingType.Element);
			_columnContactGroupId.ReadOnly = true;
			_columnContactGroupId.Caption = @"ContactGroupId";
			this.Columns.Add(_columnContactGroupId);

			_columnName = new DataColumn("Name", typeof(System.String), null, MappingType.Element);
			_columnName.ReadOnly = true;
			_columnName.Caption = @"Name";
			this.Columns.Add(_columnName);

			_columnEmailAddress = new DataColumn("EmailAddress", typeof(System.String), null, MappingType.Element);
			_columnEmailAddress.ReadOnly = true;
			_columnEmailAddress.Caption = @"EmailAddress";
			this.Columns.Add(_columnEmailAddress);

			_columnMailAddress = new DataColumn("MailAddress", typeof(System.String), null, MappingType.Element);
			_columnMailAddress.ReadOnly = true;
			_columnMailAddress.Caption = @"MailAddress";
			this.Columns.Add(_columnMailAddress);

			_columnMailState = new DataColumn("MailState", typeof(System.String), null, MappingType.Element);
			_columnMailState.ReadOnly = true;
			_columnMailState.Caption = @"MailState";
			this.Columns.Add(_columnMailState);

			_columnMailCity = new DataColumn("MailCity", typeof(System.String), null, MappingType.Element);
			_columnMailCity.ReadOnly = true;
			_columnMailCity.Caption = @"MailCity";
			this.Columns.Add(_columnMailCity);

			_columnMailZip = new DataColumn("MailZip", typeof(System.String), null, MappingType.Element);
			_columnMailZip.ReadOnly = true;
			_columnMailZip.Caption = @"MailZip";
			this.Columns.Add(_columnMailZip);

			_columnMailCountry = new DataColumn("MailCountry", typeof(System.String), null, MappingType.Element);
			_columnMailCountry.ReadOnly = true;
			_columnMailCountry.Caption = @"MailCountry";
			this.Columns.Add(_columnMailCountry);

			_columnPhone = new DataColumn("Phone", typeof(System.String), null, MappingType.Element);
			_columnPhone.ReadOnly = true;
			_columnPhone.Caption = @"Phone";
			this.Columns.Add(_columnPhone);

			_columnMobilePhone = new DataColumn("MobilePhone", typeof(System.String), null, MappingType.Element);
			_columnMobilePhone.ReadOnly = true;
			_columnMobilePhone.Caption = @"MobilePhone";
			this.Columns.Add(_columnMobilePhone);

			_columnFax = new DataColumn("Fax", typeof(System.String), null, MappingType.Element);
			_columnFax.ReadOnly = true;
			_columnFax.Caption = @"Fax";
			this.Columns.Add(_columnFax);

			_columnContactVisitDate = new DataColumn("ContactVisitDate", typeof(System.String), null, MappingType.Element);
			_columnContactVisitDate.ReadOnly = true;
			_columnContactVisitDate.Caption = @"ContactVisitDate";
			this.Columns.Add(_columnContactVisitDate);

			_columnSent = new DataColumn("Sent", typeof(System.String), null, MappingType.Element);
			_columnSent.ReadOnly = true;
			_columnSent.Caption = @"Sent";
			this.Columns.Add(_columnSent);

			_columnContactGroupName = new DataColumn("ContactGroupName", typeof(System.String), null, MappingType.Element);
			_columnContactGroupName.ReadOnly = true;
			_columnContactGroupName.Caption = @"ContactGroupName";
			this.Columns.Add(_columnContactGroupName);

			_columnBusinessRuleId = new DataColumn("BusinessRuleId", typeof(System.Int32), null, MappingType.Element);
			_columnBusinessRuleId.ReadOnly = true;
			_columnBusinessRuleId.Caption = @"BusinessRuleId";
			this.Columns.Add(_columnBusinessRuleId);
			
			// __LLBLGENPRO_USER_CODE_REGION_START InitClass
			// __LLBLGENPRO_USER_CODE_REGION_END
			
		}


		/// <summary>
		/// Initializes the members, after a clone action.
		/// </summary>
		private void InitMembers()
		{
			_columnContactId = this.Columns["ContactId"];
			_columnContactGroupId = this.Columns["ContactGroupId"];
			_columnName = this.Columns["Name"];
			_columnEmailAddress = this.Columns["EmailAddress"];
			_columnMailAddress = this.Columns["MailAddress"];
			_columnMailState = this.Columns["MailState"];
			_columnMailCity = this.Columns["MailCity"];
			_columnMailZip = this.Columns["MailZip"];
			_columnMailCountry = this.Columns["MailCountry"];
			_columnPhone = this.Columns["Phone"];
			_columnMobilePhone = this.Columns["MobilePhone"];
			_columnFax = this.Columns["Fax"];
			_columnContactVisitDate = this.Columns["ContactVisitDate"];
			_columnSent = this.Columns["Sent"];
			_columnContactGroupName = this.Columns["ContactGroupName"];
			_columnBusinessRuleId = this.Columns["BusinessRuleId"];
			
			// __LLBLGENPRO_USER_CODE_REGION_START InitMembers
			// __LLBLGENPRO_USER_CODE_REGION_END
			
		}


		/// <summary>
		/// Return the type of the typed datarow
		/// </summary>
		/// <returns>returns the requested type</returns>
		protected override Type GetRowType() 
		{
			return typeof(VTemplateDevRow);
		}


		/// <summary>
		/// Clones this instance.
		/// </summary>
		/// <returns>A clone of this instance</returns>
		public override DataTable Clone() 
		{
			VTemplateDevTypedView cloneToReturn = ((VTemplateDevTypedView)(base.Clone()));
			cloneToReturn.InitMembers();
			return cloneToReturn;
		}

#if !CF
		/// <summary>
		/// Creates a new instance of the DataTable class.
		/// </summary>
		/// <returns>a new instance of a datatable with this schema.</returns>
		protected override DataTable CreateInstance() 
		{
			return new VTemplateDevTypedView();
		}
#endif

		#region Class Property Declarations
		/// <summary>
		/// Returns the amount of rows in this typed view.
		/// </summary>
		[System.ComponentModel.Browsable(false)]
		public int Count 
		{
			get 
			{
				return this.Rows.Count;
			}
		}
		
		/// <summary>
		/// The custom properties for this TypedView type.
		/// </summary>
		/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
		public static Hashtable CustomProperties
		{
			get { return _customProperties;}
		}

		/// <summary>
		/// The custom properties for the type of this TypedView instance.
		/// </summary>
		/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
		[System.ComponentModel.Browsable(false)]
		public virtual Hashtable CustomPropertiesOfType
		{
			get { return VTemplateDevTypedView.CustomProperties;}
		}

		/// <summary>
		/// The custom properties for the fields of this TypedView type. The returned Hashtable contains per fieldname a hashtable of name-value
		/// pairs. 
		/// </summary>
		/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
		public static Hashtable FieldsCustomProperties
		{
			get { return _fieldsCustomProperties;}
		}

		/// <summary>
		/// The custom properties for the fields of the type of this TypedView instance. The returned Hashtable contains per fieldname a hashtable of name-value
		/// pairs. 
		/// </summary>
		/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
		[System.ComponentModel.Browsable(false)]
		public virtual Hashtable FieldsCustomPropertiesOfType
		{
			get { return VTemplateDevTypedView.FieldsCustomProperties;}
		}

		/// <summary>
		/// Indexer of this strong typed view
		/// </summary>
		public VTemplateDevRow this[int index] 
		{
			get 
			{
				return ((VTemplateDevRow)(this.Rows[index]));
			}
		}

	
		/// <summary>
		/// Returns the column object belonging to the TypedView field ContactId
		/// </summary>
		internal DataColumn ContactIdColumn 
		{
			get { return _columnContactId; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field ContactGroupId
		/// </summary>
		internal DataColumn ContactGroupIdColumn 
		{
			get { return _columnContactGroupId; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field Name
		/// </summary>
		internal DataColumn NameColumn 
		{
			get { return _columnName; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field EmailAddress
		/// </summary>
		internal DataColumn EmailAddressColumn 
		{
			get { return _columnEmailAddress; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field MailAddress
		/// </summary>
		internal DataColumn MailAddressColumn 
		{
			get { return _columnMailAddress; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field MailState
		/// </summary>
		internal DataColumn MailStateColumn 
		{
			get { return _columnMailState; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field MailCity
		/// </summary>
		internal DataColumn MailCityColumn 
		{
			get { return _columnMailCity; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field MailZip
		/// </summary>
		internal DataColumn MailZipColumn 
		{
			get { return _columnMailZip; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field MailCountry
		/// </summary>
		internal DataColumn MailCountryColumn 
		{
			get { return _columnMailCountry; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field Phone
		/// </summary>
		internal DataColumn PhoneColumn 
		{
			get { return _columnPhone; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field MobilePhone
		/// </summary>
		internal DataColumn MobilePhoneColumn 
		{
			get { return _columnMobilePhone; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field Fax
		/// </summary>
		internal DataColumn FaxColumn 
		{
			get { return _columnFax; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field ContactVisitDate
		/// </summary>
		internal DataColumn ContactVisitDateColumn 
		{
			get { return _columnContactVisitDate; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field Sent
		/// </summary>
		internal DataColumn SentColumn 
		{
			get { return _columnSent; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field ContactGroupName
		/// </summary>
		internal DataColumn ContactGroupNameColumn 
		{
			get { return _columnContactGroupName; }
		}
    
		/// <summary>
		/// Returns the column object belonging to the TypedView field BusinessRuleId
		/// </summary>
		internal DataColumn BusinessRuleIdColumn 
		{
			get { return _columnBusinessRuleId; }
		}
    
		
		// __LLBLGENPRO_USER_CODE_REGION_START AdditionalColumnProperties
		// __LLBLGENPRO_USER_CODE_REGION_END
		
 		#endregion
		
		#region Custom Typed View code
		
		// __LLBLGENPRO_USER_CODE_REGION_START CustomTypedViewCode
		// __LLBLGENPRO_USER_CODE_REGION_END
		
		#endregion

		#region Included Code

		#endregion
	}


	/// <summary>
	/// Typed datarow for the typed datatable VTemplateDev
	/// </summary>
	public partial class VTemplateDevRow : DataRow
		// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfacesRow
		// __LLBLGENPRO_USER_CODE_REGION_END
			
	{
		#region Class Member Declarations
		private VTemplateDevTypedView	_parent;
		#endregion

		/// <summary>
		/// CTor
		/// </summary>
		/// <param name="rowBuilder">Row builder object to use when building this row</param>
		internal VTemplateDevRow(DataRowBuilder rowBuilder) : base(rowBuilder) 
		{
			_parent = ((VTemplateDevTypedView)(this.Table));
		}


		#region Class Property Declarations
	
		/// <summary>
		/// Gets / sets the value of the TypedView field ContactId<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."ContactId"<br/>
		/// View field characteristics (type, precision, scale, length): Int, 10, 0, 0
		/// </remarks>
		public System.Int32 ContactId 
		{
			get 
			{
				if(IsContactIdNull())
				{
					// return default value for this type.
					return (System.Int32)TypeDefaultValue.GetDefaultValue(typeof(System.Int32));
				}
				else
				{
					return (System.Int32)this[_parent.ContactIdColumn];
				}
			}
			set 
			{
				this[_parent.ContactIdColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field ContactId is NULL, false otherwise.
		/// </summary>
		public bool IsContactIdNull() 
		{
			return IsNull(_parent.ContactIdColumn);
		}

		/// <summary>
		/// Sets the TypedView field ContactId to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetContactIdNull() 
		{
			this[_parent.ContactIdColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field ContactGroupId<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."ContactGroupId"<br/>
		/// View field characteristics (type, precision, scale, length): Int, 10, 0, 0
		/// </remarks>
		public System.Int32 ContactGroupId 
		{
			get 
			{
				if(IsContactGroupIdNull())
				{
					// return default value for this type.
					return (System.Int32)TypeDefaultValue.GetDefaultValue(typeof(System.Int32));
				}
				else
				{
					return (System.Int32)this[_parent.ContactGroupIdColumn];
				}
			}
			set 
			{
				this[_parent.ContactGroupIdColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field ContactGroupId is NULL, false otherwise.
		/// </summary>
		public bool IsContactGroupIdNull() 
		{
			return IsNull(_parent.ContactGroupIdColumn);
		}

		/// <summary>
		/// Sets the TypedView field ContactGroupId to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetContactGroupIdNull() 
		{
			this[_parent.ContactGroupIdColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field Name<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."Name"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 255
		/// </remarks>
		public System.String Name 
		{
			get 
			{
				if(IsNameNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.NameColumn];
				}
			}
			set 
			{
				this[_parent.NameColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field Name is NULL, false otherwise.
		/// </summary>
		public bool IsNameNull() 
		{
			return IsNull(_parent.NameColumn);
		}

		/// <summary>
		/// Sets the TypedView field Name to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetNameNull() 
		{
			this[_parent.NameColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field EmailAddress<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."EmailAddress"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 255
		/// </remarks>
		public System.String EmailAddress 
		{
			get 
			{
				if(IsEmailAddressNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.EmailAddressColumn];
				}
			}
			set 
			{
				this[_parent.EmailAddressColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field EmailAddress is NULL, false otherwise.
		/// </summary>
		public bool IsEmailAddressNull() 
		{
			return IsNull(_parent.EmailAddressColumn);
		}

		/// <summary>
		/// Sets the TypedView field EmailAddress to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetEmailAddressNull() 
		{
			this[_parent.EmailAddressColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field MailAddress<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."MailAddress"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 30
		/// </remarks>
		public System.String MailAddress 
		{
			get 
			{
				if(IsMailAddressNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.MailAddressColumn];
				}
			}
			set 
			{
				this[_parent.MailAddressColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field MailAddress is NULL, false otherwise.
		/// </summary>
		public bool IsMailAddressNull() 
		{
			return IsNull(_parent.MailAddressColumn);
		}

		/// <summary>
		/// Sets the TypedView field MailAddress to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetMailAddressNull() 
		{
			this[_parent.MailAddressColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field MailState<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."MailState"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 255
		/// </remarks>
		public System.String MailState 
		{
			get 
			{
				if(IsMailStateNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.MailStateColumn];
				}
			}
			set 
			{
				this[_parent.MailStateColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field MailState is NULL, false otherwise.
		/// </summary>
		public bool IsMailStateNull() 
		{
			return IsNull(_parent.MailStateColumn);
		}

		/// <summary>
		/// Sets the TypedView field MailState to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetMailStateNull() 
		{
			this[_parent.MailStateColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field MailCity<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."MailCity"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 255
		/// </remarks>
		public System.String MailCity 
		{
			get 
			{
				if(IsMailCityNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.MailCityColumn];
				}
			}
			set 
			{
				this[_parent.MailCityColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field MailCity is NULL, false otherwise.
		/// </summary>
		public bool IsMailCityNull() 
		{
			return IsNull(_parent.MailCityColumn);
		}

		/// <summary>
		/// Sets the TypedView field MailCity to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetMailCityNull() 
		{
			this[_parent.MailCityColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field MailZip<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."MailZip"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 255
		/// </remarks>
		public System.String MailZip 
		{
			get 
			{
				if(IsMailZipNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.MailZipColumn];
				}
			}
			set 
			{
				this[_parent.MailZipColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field MailZip is NULL, false otherwise.
		/// </summary>
		public bool IsMailZipNull() 
		{
			return IsNull(_parent.MailZipColumn);
		}

		/// <summary>
		/// Sets the TypedView field MailZip to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetMailZipNull() 
		{
			this[_parent.MailZipColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field MailCountry<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."MailCountry"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 255
		/// </remarks>
		public System.String MailCountry 
		{
			get 
			{
				if(IsMailCountryNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.MailCountryColumn];
				}
			}
			set 
			{
				this[_parent.MailCountryColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field MailCountry is NULL, false otherwise.
		/// </summary>
		public bool IsMailCountryNull() 
		{
			return IsNull(_parent.MailCountryColumn);
		}

		/// <summary>
		/// Sets the TypedView field MailCountry to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetMailCountryNull() 
		{
			this[_parent.MailCountryColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field Phone<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."Phone"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 255
		/// </remarks>
		public System.String Phone 
		{
			get 
			{
				if(IsPhoneNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.PhoneColumn];
				}
			}
			set 
			{
				this[_parent.PhoneColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field Phone is NULL, false otherwise.
		/// </summary>
		public bool IsPhoneNull() 
		{
			return IsNull(_parent.PhoneColumn);
		}

		/// <summary>
		/// Sets the TypedView field Phone to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetPhoneNull() 
		{
			this[_parent.PhoneColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field MobilePhone<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."MobilePhone"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 255
		/// </remarks>
		public System.String MobilePhone 
		{
			get 
			{
				if(IsMobilePhoneNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.MobilePhoneColumn];
				}
			}
			set 
			{
				this[_parent.MobilePhoneColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field MobilePhone is NULL, false otherwise.
		/// </summary>
		public bool IsMobilePhoneNull() 
		{
			return IsNull(_parent.MobilePhoneColumn);
		}

		/// <summary>
		/// Sets the TypedView field MobilePhone to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetMobilePhoneNull() 
		{
			this[_parent.MobilePhoneColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field Fax<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."Fax"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 255
		/// </remarks>
		public System.String Fax 
		{
			get 
			{
				if(IsFaxNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.FaxColumn];
				}
			}
			set 
			{
				this[_parent.FaxColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field Fax is NULL, false otherwise.
		/// </summary>
		public bool IsFaxNull() 
		{
			return IsNull(_parent.FaxColumn);
		}

		/// <summary>
		/// Sets the TypedView field Fax to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetFaxNull() 
		{
			this[_parent.FaxColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field ContactVisitDate<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."ContactVisitDate"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 30
		/// </remarks>
		public System.String ContactVisitDate 
		{
			get 
			{
				if(IsContactVisitDateNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.ContactVisitDateColumn];
				}
			}
			set 
			{
				this[_parent.ContactVisitDateColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field ContactVisitDate is NULL, false otherwise.
		/// </summary>
		public bool IsContactVisitDateNull() 
		{
			return IsNull(_parent.ContactVisitDateColumn);
		}

		/// <summary>
		/// Sets the TypedView field ContactVisitDate to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetContactVisitDateNull() 
		{
			this[_parent.ContactVisitDateColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field Sent<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."Sent"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 1
		/// </remarks>
		public System.String Sent 
		{
			get 
			{
				if(IsSentNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.SentColumn];
				}
			}
			set 
			{
				this[_parent.SentColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field Sent is NULL, false otherwise.
		/// </summary>
		public bool IsSentNull() 
		{
			return IsNull(_parent.SentColumn);
		}

		/// <summary>
		/// Sets the TypedView field Sent to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetSentNull() 
		{
			this[_parent.SentColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field ContactGroupName<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."ContactGroupName"<br/>
		/// View field characteristics (type, precision, scale, length): VarChar, 0, 0, 255
		/// </remarks>
		public System.String ContactGroupName 
		{
			get 
			{
				if(IsContactGroupNameNull())
				{
					// return default value for this type.
					return (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String));
				}
				else
				{
					return (System.String)this[_parent.ContactGroupNameColumn];
				}
			}
			set 
			{
				this[_parent.ContactGroupNameColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field ContactGroupName is NULL, false otherwise.
		/// </summary>
		public bool IsContactGroupNameNull() 
		{
			return IsNull(_parent.ContactGroupNameColumn);
		}

		/// <summary>
		/// Sets the TypedView field ContactGroupName to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetContactGroupNameNull() 
		{
			this[_parent.ContactGroupNameColumn] = System.Convert.DBNull;
		}

	

		/// <summary>
		/// Gets / sets the value of the TypedView field BusinessRuleId<br/><br/>
		/// 
		/// </summary>
		/// <remarks>
		/// Mapped on view field: "vTemplateDev"."BusinessRuleId"<br/>
		/// View field characteristics (type, precision, scale, length): Int, 10, 0, 0
		/// </remarks>
		public System.Int32 BusinessRuleId 
		{
			get 
			{
				if(IsBusinessRuleIdNull())
				{
					// return default value for this type.
					return (System.Int32)TypeDefaultValue.GetDefaultValue(typeof(System.Int32));
				}
				else
				{
					return (System.Int32)this[_parent.BusinessRuleIdColumn];
				}
			}
			set 
			{
				this[_parent.BusinessRuleIdColumn] = value;
			}
		}

		/// <summary>
		/// Returns true if the TypedView field BusinessRuleId is NULL, false otherwise.
		/// </summary>
		public bool IsBusinessRuleIdNull() 
		{
			return IsNull(_parent.BusinessRuleIdColumn);
		}

		/// <summary>
		/// Sets the TypedView field BusinessRuleId to NULL. Not recommended; a typed list should be used
		/// as a readonly object.
		/// </summary>
    	public void SetBusinessRuleIdNull() 
		{
			this[_parent.BusinessRuleIdColumn] = System.Convert.DBNull;
		}

	
		#endregion
		
		#region Custom Typed View Row Code
		
		// __LLBLGENPRO_USER_CODE_REGION_START CustomTypedViewRowCode
		// __LLBLGENPRO_USER_CODE_REGION_END
		
		#endregion
	}
}
